---
title: iOS
hide_title: true
sidebar_position: 2
---

#### 连接状态

```objc
typedef NS_ENUM(NSUInteger, JConnectionStatus) {
    //未连接
    JConnectionStatusIdle = 0,
    //已连接
    JConnectionStatusConnected = 1,
    //连接断开（用户主动断开）
    JConnectionStatusDisconnected = 2,
    //连接中
    JConnectionStatusConnecting = 3,
    //连接失败，用户可根据 JErrorCode 来决定相应的处理
    JConnectionStatusFailure
};
```

#### 会话类型

```objc
/*!
 会话类型
 */
typedef NS_ENUM(NSUInteger, JConversationType) {
    
    JConversationTypeUnknown = 0,
    /*!
     单聊
     */
    JConversationTypePrivate = 1,

    /*!
     群组
     */
    JConversationTypeGroup = 2,

    /*!
     聊天室
     */
    JConversationTypeChatroom = 3,

    /*!
     系统会话
     */
    JConversationTypeSystem = 4,
};
```

